import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

/**
* @author Irina
*
*/
public class InventoryTest {
private CoffeeMaker cm;
private Inventory i;
private Recipe r2;


/**
* @throws java.lang.Exception
*/
@Before
public void setUp() {
cm = new CoffeeMaker();
i = new Inventory();

r2= new Recipe();
r2.setName("Chocolate");
r2.setPrice(20);
r2.setAmtCoffee(0);
r2.setAmtMilk(2);
r2.setAmtSugar(2);
r2.setAmtChocolate(2);
}

/**
* Test method for getChocolate()}.
*/
@Test
public void testGetChocolate() {
i.setChocolate(2);
assertEquals(2,i.getChocolate());
}

/**
* Test method for setChocolate}
*/

/**
* Test method forgetCoffee
*/
@Test
public void testGetCoffee() {
i.setCoffee(1);
assertEquals(1,i.getCoffee());
}

/**
* Test method for setCoffee
*/
@Test
public void testSetCoffee() {
i.setCoffee(0);
assertEquals(0,i.getCoffee());
}

/**
* Test method for getMilk
*/
@Test
public void testGetMilk() {
i.setMilk(3);
assertEquals(3,i.getMilk());
}

/**
* Test method for setMilk
*/
@Test
public void testSetMilk() {
i.setMilk(0);
assertEquals(0,i.getMilk());
}

/**
* Test method for getSugar
*/
@Test
public void testGetSugar() {
i.setSugar(3);
assertEquals(3,i.getSugar());
}

/**
* Test method for Sugar
*/
@Test
public void testSetSugar() {

}

/**
* Test method for enoughIngredients
*/
@Test
public void testEnoughIngredients_1() {
i.enoughIngredients(r2);
assertTrue(i.enoughIngredients(r2));
}

@Test
public void testEnoughIngredients_2() {
//r2.setAmtSugar(4);
i.enoughIngredients(r2);
assertTrue(i.enoughIngredients(r2));
}
/**
* Test method for toString
*/
@Test
public void testToString() {

r2.setName("Chocolate");
assertEquals("Chocolate",r2.toString());
}


}
















































































































